<?php defined('SYSPATH') OR die('No direct access allowed.');
$action = isset($category) ? 'edit' : 'add';
?>
<form method="post" action="/<?=Router::uri('admin', array('controller'=>'forum', 'method'=>'add'))?>">
<h3><?=Kohana::lang('admin/category.add.title')?></h3>
<ol>
	<li>
	<? if (!is_null($parent)) echo form::hidden('parent', $parent->id);?>
	<?message::render('validation', 'title')?>
		<label for="title"><?=Kohana::lang('admin/category.title.label')?></label>
		<input type="text" name="title" id="title" value="<?=message::custom('title')?>" />
	</li>
	<li>
	<?message::render('validation', 'description')?>
		<label for="description"><?=Kohana::lang('admin/category.description.label')?></label>
		<input type="text" name="description" id="description" value="<?=message::custom('description')?>" />
	</li>
	<li>
		<input type="submit" value="<?=Kohana::lang('admin/category.'.$action.'.submit')?>" />
	</li>
</ol>
</form>
